#ifndef __SCNS_APDS9960_H__
#define __SCNS_APDS9960_H__

#include "ScnsConfig.h"

#if defined(SCNS_APDS9960_ENABLE)&&SCNS_APDS9960_ENABLE==1

#include "ScnsBspApds9960.h"

#include "ScnsYing.h"

typedef enum
{
    SCNS_APDS9960_STATUS_OK=SCNS_YING_STATUS_OK,
    SCNS_APDS9960_STATUS_BSP_FAILED=SCNS_YING_STATUS_BSP_FAILED,
    SCNS_APDS9960_STATUS_FAILED=SCNS_YING_STATUS_FAILED,
    SCNS_APDS9960_STATUS_TIME_OUT=SCNS_YING_STATUS_TIME_OUT,
}ScnsApds9960Status;
enum {
    DIR_NONE,
    DIR_LEFT,
    DIR_RIGHT,
    DIR_UP,
    DIR_DOWN,
    DIR_NEAR,
    DIR_FAR,
    DIR_ALL
};

typedef struct
{
    uint16 oc;
    uint16 or;
    uint16 og;
    uint16 ob;
    uint8 r;
    uint8 g;
    uint8 b;
    float wr;
    float wg;
    float wb;
    
    uint8 proximity;
    uint8 gesture;
}ScnsApds9960Result;

extern ScnsApds9960Result scnsApds9960Result[SCNS_APDS9960_MAX];

extern ScnsApds9960Status scnsApds9960Init(ScnsApds9960Enum apdN);
extern void scnsApds9960Interrupt(ScnsApds9960Enum apdN);

#endif
#endif
